home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig09_07.jar / Ch09 / Fig09_07 / Fig09_07.cpp < prev    next >
C/C++ Source or Header  |  1997-10-27  |  442b  |  24 lines

  1. // Fig. 9.7: fig09_07.cpp
  2. // Demonstrate when base-class and derived-class
  3. // constructors and destructors are called.
  4. #include <iostream.h>
  5. #include "point2.h"
  6. #include "circle2.h"
  7.  
  8. int main()
  9. {
  10.    // Show constructor and destructor calls for Point
  11.    {
  12.       Point p( 11, 22 );
  13.    }
  14.  
  15.    cout << endl;
  16.    Circle circle1( 4.5, 72, 29 );
  17.    cout << endl;
  18.    Circle circle2( 10, 5, 5 );
  19.    cout << endl;
  20.    return 0;
  21. }
  22.  
  23.  
  24.